<?php


namespace app\admin\model;

use think\Model;

class Admin extends Model
{
    protected $table='dc_Admin';
    public function getStatusAttr($value){
        $status=[1=>'在线',2=>'忙碌',3=>'离线'];
        return $status[$value];
    }
    public function getList(){
        return $this->field('id as mid,username,headpic,status')
            ->order(array('status'=>'asc','username'=>'asc'))
            ->paginate(5);
    }
    public function delManage($no){
        return $this->where('id',$no)->delete();
    }
}